<template lang="pug">
  el-radio-group.dashboard-form-interval(
    v-model="interval"
    size="mini")
    el-radio-button(
      v-for="(interval, index) of intervalList"
      :key="'interval'+index"
      :label="interval.value") {{interval.label}}
</template>
·
<script >
/**
 * @name DashboardInterval 搜索条件里的步长选择器
 * @author 陈可嘉
 * @description 有小时、日、月、年选择
 */
import { intervalList } from './info'

export default {
  name: 'DashboardInterval',
  components: {
  },
  props: {
    value: String
  },
  computed: {
    interval: {
      get () {
        return this.value
      },
      set (data) {
        this.$emit('input', data)
      }
    }
  },
  data () {
    return {
      intervalList
    }
  }
}
</script>

<style lang="sass" scoped>
.dashboard-form-interval
  margin-left: 6px
  label
    margin-bottom: 0
</style>
